#include<iostream>
#include<string>
using namespace std;

class A{
//private:
//	char *p;
public:
	A(){
//		cout<<"A的构造函数"<<endl;
//		this->p=new char[64];
////		memset(this->p,0,64);
////		strcpy(this->p,"A的构造函数");
	}
	virtual void print(){
		cout<<"A print..."<<endl;
	}
	virtual ~A(){
		cout<<"A的析构函数"<<endl;
//		if(this->p!=NULL){
//			delete[] this->p;
//			this->p=NULL;
//		}
	}
};
class B:public A{
//private:
//	char *p;
public:
	B(){
//		cout<<"B的构造函数"<<endl;
//		this->p=new char[64];
	}
	virtual void print(){
			cout<<"B print..."<<endl;
		}
	virtual ~B(){
		cout<<"B的析构函数"<<endl;
//		if(this->p!=NULL){
//			delete[] this->p;
//			this->p=NULL;
//		}
	}
};

void method(A *a){
	delete a;
}

int main26(){
	B *b=new B;
	method(b);
	cout<<endl;
	return 0;
}
